//
//  BDLoadingView.h
//  爱贝儿医
//
//  Created by 王磊 on 6/13/16.
//  Copyright © 2016 爱贝儿医. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger ,BDLoadingStatus) {
    BDLoadingStatusInternetConnectionFailure, // 网络连接异常
    BDLoadingStatusLoading,// 加载中
    BDLoadingStatusSuccess,//成功
    BDLoadingStatusFailure // 失败
};
@class BDLoadingView;

@protocol BDLoadingViewDelegate <NSObject>

- (void)loadingView:(BDLoadingView *)loadingView onListenLoadingStatus:(BDLoadingStatus )status;
@optional
- (void)onBackItemClick;

@end

@interface BDLoadingView : UIView

@property (nonatomic ,weak) id<BDLoadingViewDelegate>delegate;

@property (nonatomic ,assign)BDLoadingStatus loadingStatus;

@property (nonatomic ,strong) UIButton *backButton;

@property (nonatomic ,strong) UIButton *backButton1;

@property (nonatomic ,strong) UILabel *reloadLabel;

@property (nonatomic ,strong) UIActivityIndicatorView *activity;

+ (BDLoadingView *)loadingView;

+ (BDLoadingView *)loadingView:(CGRect)frame ;

@end
